﻿using System.Collections.Generic;
using Litografia.BusinessEntities;
using Litografia.DataObjects;

namespace Litografia.BusinessComponents
{
    public class BCEntity
    {
        #region Methods: Public

        public static List<BEEntity> GetList(EntityType entidad, string filter)
        {
            return new DOEntity(entidad).GetList(filter, "");
        }

        public static BEEntity GetItemById(EntityType entity, string id)
        {
            var lista = new DOEntity(entity).GetList("",id);
            if (lista.Count == 1)
                return lista[0];

            return null;
        }

        #endregion
    }
}
